-- RecallGiftM
-- Create by dengc
-- 老玩家召回礼包模块

module("RecallGiftM", package.seeall);

-- 所有的配置信息
local recallGiftTable = {};

-- 载入配置表
local _init = false;
local loadCsv = function()
    if _init then return end
    _init = true;

    -- 转换下audio信息表
    local recallGift_CSV = get_recall_gift_CSV();
    for i = 1, #recallGift_CSV do
        recallGiftTable[recallGift_CSV[i].id] = recallGift_CSV[i];
    end

    recallGift_CSV = {};
end

-- 模块初始化
function init()
    loadCsv();
end

-- 检索提示信息
function query(id, path)
    local m = recallGiftTable[id]

    if not m or path == "" or not path then
        return m
    end

    return m[path]
end
